<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>A&T</title>
    <script src="../Vue.js"></script>
    <style>
        #blcs{
            width: 200px;
            height: 200px;
            background-color: deepskyblue;
        }

        .Bouncer-enter-active{
            transition: opacity 3s;
            animation: Bonce 3s;
        }

        .Bouncer-leave-active{
            transition: opacity 3s;
            animation: Bonce 3s reverse;
        }

        .Bouncer-enter, .Bouncer-leave-to{
            opacity:0;
        }

        @keyframes Bonce {
            0%{
            transform: scale(0);
        }
            50%{
            transform: scale(1.5);
        }
            100%{
                transform: scale(1);
            }
        }

    </style>
</head>
<body>

    <div id="app">

            <transition name="Bouncer">
                <div v-if="isShow">
                <div id="blcs">快来看看</div>
                </div>
            </transition>


        <button type="button" @click="Toggled">点下切换</button>
    </div>

    <script>
        var app = new Vue({
            el:"#app",
            data:{
                isShow:true
            },
            methods:{
                Toggled:function () {
                    this.isShow = !this.isShow
                }
            }
        })
    </script>
</body>
</html>